#include <bits/stdc++.h>
using namespace std;
int main(){
    int cnt=0,n;
    int sum=0;
    int day=1;
    cin>>n;
    while(true){
        for (int i = 1; i <= day; i++)
        {
            if (cnt >= n) {
                cout<<sum;
                return 0;
            }
            sum+=day;
            cnt++;
        }
        day++;
    }
    return 0;
}